import copy

# a = [12,32,3]
# b = [1,2,3,4]
# c = [a,b]
# #浅拷贝
# d = copy.copy(c) #如果c是可变,则产生的新地址
#
# a.append(555)
# print(c[0])
# print(d[0])
#
# print(id(c))
# print(id(d))


# a = [1,23,4]
# b = [2,3,4]
# c = (a,b)
# d = copy.copy(c) # c 元组是不可变类型，指针指向为同一个地址
# a.append(66)
# print(c[0])
# print(d[0])
#
# print(id(c))
# print(id(d))



a = [1,23,4]
b = [2,3,4]
c = [a,b]
d = copy.deepcopy(c) # 深拷贝 内部都内都被拷贝，产生新的对象地址

a.append(66)
print(c[0])
print(d[0])

print(id(c))
print(id(d))


